﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" CodeBehind="AddPm.aspx.cs" Inherits="HRM.UI.HRManagerUI.EmpModule.AddPmManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Project/ProjectManagerCss.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/htmlDatePicker.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/htmlDatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">

        function CheckField() {
            if (document.getElementById("<%=txtEmployeeCodepm.ClientID%>").value == "") {
                document.getElementById("<%=MsgLebel.ClientID%>").textContent = "Please Enter Employee Code!";
                document.getElementById("<%=MsgLebel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEmployeeCodepm.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=ddProjectList.ClientID%>").Value == "") {
                document.getElementById("<%=MsgLebel.ClientID%>").textContent = "Please Choose one project";
                document.getElementById("<%=MsgLebel.ClientID%>").style.color = "red";
                document.getElementById("<%=ddProjectList.ClientID%>").focus();
                return false;
            }

            return true;
        }
  

    </script>
    <div id="titleDiv">
        Assign Project Manager</div>
    <div class="msgBar">
        <asp:Label runat="server" ID="MsgLebel"></asp:Label></div>
    <table class="pmTB">
        <tr>
            <td class="Label">
                Employee Code
            </td>
            <td class="Field">
                <input type="text" id="txtEmployeeCodepm" class="textboxinput" runat="server" /><span
                    class="estaricStar">*</span>
            </td>
        </tr>
        <tr>
            <td class="Label">
                Project Name
            </td>
            <td class="Field">
                <select runat="server" id="ddProjectList" class="dropdownCss">
                </select><span class="estaricStar">*</span>
            </td>
        </tr>
        <tr>
            <td class="Label">
                Date
            </td>
            <td class="Field">
                <input type="text" id="txtDatepm" class="textboxinput" readonly onclick="GetDate(this);"
                    runat="server" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <input id="Submit1" type="submit" value="Add Manager" name="submit" class="btnCss"
                    runat="server" onserverclick="SaveManager" onclick="return CheckField()" />
            </td>
        </tr>
    </table>
    <div id="PmManagerGdvDiv">
        <fieldset>
            <legend>Project Details </legend>
            <div align="center"><asp:Label runat="server" ID="LblDeletePm"></asp:Label></div>
            <asp:GridView runat="server" ID="PmManagerGdv" Width="100%" AutoGenerateColumns="False"
                 BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                CellPadding="3" CssClass="GridviewStyle" 
                onpageindexchanging="PmManagerGdv_PageIndexChanging" 
                onrowdeleting="PmManagerGdv_RowDeleting">
                <Columns>
                    <asp:TemplateField HeaderText="Id" Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="lblId" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="EmployeeName" HeaderText="Employee Name" />
                    <asp:BoundField DataField="Designation" HeaderText="Designation" />
                    <asp:BoundField DataField="ProjectName" HeaderText="Project Name" />
                    <asp:BoundField DataField="startingDate" HeaderText="starting Date" />
                    <asp:BoundField DataField="clossingDate" HeaderText="clossing Date" />
                    <asp:BoundField DataField="ProjectDetails" HeaderText="Project Details" />
                    <asp:BoundField DataField="totalEmployee" HeaderText="Total Employee" />
                    <asp:BoundField DataField="Location" HeaderText="Location" />
                    <asp:CommandField HeaderText="Delete" ShowDeleteButton="True"/>
                </Columns>
                <FooterStyle CssClass="GridViewFooterStyle"/>
                <HeaderStyle CssClass="GridViewHeaderStyle"/>
                <PagerStyle  CssClass="GridViewFooterStyle" HorizontalAlign="Center"  />
                <RowStyle ForeColor="#000066" />
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#00547E" />
            </asp:GridView>
        </fieldset>
    </div>
</asp:Content>
